#!/bin/bash


docker stop $(docker ps -a -f "ancestor=nanjingbeirailwaystationwebapi" -q)
docker rm $(docker ps -a -f "ancestor=nanjingbeirailwaystationwebapi" -q)
docker rmi  nanjingbeirailwaystationwebapi --force


DIR="/root/NanjingbeiRailwayStation"


    cd NanjingbeiRailwayStation
    git pull

cd /root/NanjingbeiRailwayStation/NanjingbeiRailwayStation
docker build -f  ./NanjingbeiRailwayStation.WebApi/Dockerfile . -t nanjingbeirailwaystationwebapi
cd /root/NanjingbeiRailwayStation/Doc/docker-compose-files

docker compose   -f docker-compose-webapi.yml -p nanjingbeirailwaystation  down 
docker compose   -f docker-compose-webapi.yml -p nanjingbeirailwaystation  up -d